﻿using Furion.DatabaseAccessor;
using ST.Torch.WebApi.Core.Entities.Utils;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ST.Torch.WebApi.Core.Entities.DaTi
{
    /// <summary>
    /// 题目
    /// </summary>
    public class D_TiMu : BaseEntity, IEntityTypeBuilder<D_TiMu>
    {
        /// <summary>
        /// 题目
        /// </summary>
        [MaxLength(500)]
        public string topic { get; set; }

        /// <summary>
        /// 选项A
        /// </summary>
        [MaxLength(500)]
        public string optionA { get; set; }
        /// <summary>
        /// 选项B
        /// </summary>
        [MaxLength(500)]
        public string optionB { get; set; }
        /// <summary>
        /// 选项C
        /// </summary>
        [MaxLength(500)]
        public string optionC { get; set; }
        /// <summary>
        /// 选项D
        /// </summary>
        [MaxLength(500)]
        public string optionD { get; set; }


        public CorrectEnum CorrectOpt { get; set; }

        public void Configure(EntityTypeBuilder<D_TiMu> entityBuilder, DbContext dbContext, Type dbContextLocator)
        {
            entityBuilder.HasKey(u => u.Id);
        }
    }
    public enum CorrectEnum
    {
        /// <summary>
        /// A
        /// </summary>
        A = 1,
        /// <summary>
        /// B
        /// </summary>
        B,
        /// <summary>
        /// C
        /// </summary>
        C,
        /// <summary>
        /// D
        /// </summary>
        D
    }
}
